class People {
  constructor(name, age) {
    this.name = name
    this.age = age
  }

  eat() {
    console.log(`${this.name} eat something`)
  }

  speak() {
    console.log(`my name is ${this.name}, age ${this.age}`)
  }
}

class Student extends People {
  constructor(name, age, number) {
    super(name, age)
    this.number = number
  }

  study() {
    console.log(`${this.name} study`)
  }
}

const xiaoming = new Student('xiaoming', 10, 'A1')
console.log(xiaoming.number)
xiaoming.study()

const xiaohon = new Student('xiaohon', 12, 'A2')
console.log(xiaohon.number)
xiaohon.study()